getCostBasisCapGain

Returns a CapitalGainResult class/calculation for the given sell transaction for the given security. Works for both Average and LOT controlled securities. Updated February 2024 by Stuart Beesley to use new CostCalculation class since MD2024(5100).

Return

The capital gain values for the sales transaction, including short term and long term portions. The return value will be in the parent investment account's currency.

Parameters

sec

The security account.

sellTxn

The sale transaction to analyze.


Deprecated

Use getCostBasisCapGain() method without the 'buyTxns' parameter

Returns a CapitalGainResult class/calculation for the given sell transaction for the given security. Works for both Average and LOT controlled securities. Updated February 2024 by Stuart Beesley to use new CostCalculation class since MD2024(5100).

Return

The capital gain values for the sales transaction, including short term and long term portions. The return value will be in the parent investment account's currency.

Parameters

sec

The security account.

buyTxns

Ignored as of Moneydance 2018 build 1684 -> Always pass an empty List

sellTxn

The sale transaction to analyze.